import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-06-05
 * Time: 22:27
 */
class ZeroException extends RuntimeException {
    public ZeroException (String massage) {
        super(massage);
    }
}
class Book {
    private String name;
    private int price;
    private String author;
    private int edition;

    public Book(String name, int price, String author, int edition) {
        this.name = name;
        this.price = price;
        this.author = author;
        this.edition = edition;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getEdition() {
        return edition;
    }

    public void setEdition(int edition) {
        this.edition = edition;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", price=" + price +
                ", author='" + author + '\'' +
                ", edition=" + edition +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Book book = (Book) o;
        return edition == book.edition
                && Objects.equals(name.toLowerCase(), book.name.toLowerCase())
                && Objects.equals(author.toLowerCase(), book.author.toLowerCase());
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, author, edition);
    }
}
class BookList {
    List<Book> list = new ArrayList<>();
//    Set<Book> set = new HashSet<>();
    public void addBook(Book book) {
//        set.add(book);
        list.add(book);
    }
    public void searchBook(Book book) {
        if(list.contains(book)) {
            System.out.print("found: " +list.indexOf(book));
        } else {
            System.out.println("not found");
        }
    }
}
class CourseManagementSystem {
    Map<Integer, Integer> map = new HashMap<>();
    public void add (int no, int grade) {
        if(map.containsKey(no)) {
            System.out.println("the student already exists");
        } else {
            map.put(no, grade);
        }
    }
    public void delete(int no) {
        if(map.containsKey(no)) {
            map.remove(no);
        } else {
            System.out.println("no such student");
        }
    }
    public int query (int no) {
        return map.get(no);
    }
    public void statistic() {
        int[] count = new int[5];
//        Set<Map.Entry<Integer, Integer>> mapEntry = map.entrySet();
        Iterator<Integer> iterator = map.keySet().iterator();
        while (iterator.hasNext()) {
            Integer key = iterator.next();
            int score = map.get(key);
            if(score >= 0 && score <= 59) {
                count[0]++;
            } else if (score >= 60 && score <= 69) {
                count[1]++;
            } else if (score >= 70 && score <= 79) {
                count[2]++;
            } else if (score >= 80 && score <= 89) {
                count[3]++;
            } else if (score >= 90 && score <= 100) {
                count[4]++;
            }
        }
        System.out.println("[0-59] : " + count[0]);
        System.out.println("[60-69] : " + count[1]);
        System.out.println("[70-79] : " + count[2]);
        System.out.println("[80-89] : " + count[3]);
        System.out.println("[90-100] : " + count[4]);
    }
}
class Student {
    private int no;
    private String name;
    private int score;

    public int getNo() {
        return no;
    }

    public void setNo(int no) {
        this.no = no;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public Student(int no, String name, int score) {
        this.no = no;
        this.name = name;
        this.score = score;
    }

    @Override
    public String toString() {
        return "no:" + no +
                " name:" + name +
                " score:" + score;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return no == student.no;
    }

    @Override
    public int hashCode() {
        return Objects.hash(no);
    }
}
public class Main {
    public static void mod (int i){
        int n = 100 % i;
        System.out.println("余数结果是" + n);
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int [ ] data = new int[5];

        System.out.println("请输入5个数：");
        for (int i = 0; i < data.length; i++)
            data[i] = sc.nextInt();

        int i = 0;
        try {
            for (; i < data.length; i++) {
                mod(data[i]);
            }
        } catch (Exception e) {
            System.out.println(e.getMessage());
        } finally {
            for (i = i + 1; i < data.length; i++) {
                mod(data[i]);
            }
        }
        sc.close( );
    }
    public static void main7(String[] args) {
        int[] arr = new int[5];
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String a = scanner.next();
            if(a.equals("arr")) {
                int b = scanner.nextInt();
                try {
                    int d = arr[b];
                } catch (Exception e) {
                    System.out.println(e.toString());
                }
            } else if (a.equals("null")) {
                String b = null;
                try {
                    int n = b.length();
                } catch (Exception e) {
                    System.out.println(e);
                }
            } else if (a.equals("cast")) {
                try {
                    Object str = new String("aa");
                    System.out.println((Integer)str);
                } catch (Exception e) {
                    System.out.println(e);
                }
            } else if (a.equals("num")) {
                String b = scanner.next();
                try {
                    int d = Integer.parseInt(b);
                } catch (Exception e) {
                    System.out.println(e);
                }
            } else {
                return;
            }
        }
    }
    public static void main6(String[] args) {
        Map<Integer, Student> map = new HashMap<>();
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for (int j = 0; j < n; j++) {
            Student student = new Student(scanner.nextInt(), scanner.next(), scanner.nextInt());
            map.put(student.getNo(), student);
        }
        int count = scanner.nextInt();
        for (int i = 0; i < count; i++) {
            String order = scanner.next();
            if(order.equals("add")) {
                Student student = new Student(scanner.nextInt(), scanner.next(), scanner.nextInt());
                map.put(student.getNo(), student);
            } else if (order.equals("delete")) {
                map.remove(scanner.nextInt());
            } else {
                int id = scanner.nextInt();
                Student student = map.get(id);
                student.setScore(scanner.nextInt());
                map.put(id, student);
            }
        }
        Iterator<Integer> iterator = map.keySet().iterator();
        while (iterator.hasNext()) {
            int id = iterator.next();
            System.out.println(map.get(id));
        }
    }
    public static void main5(String[] args) {
        Scanner sc = new Scanner(System.in);
        CourseManagementSystem cms = new CourseManagementSystem();
        int ops = sc.nextInt();
        for (int i=0;i<ops;i++) {
            String op = sc.next();
            if (op.equals("add"))
                cms.add(sc.nextInt(), sc.nextInt());
            else if  (op.equals("delete"))
                cms.delete(sc.nextInt());
            else if  (op.equals("query")) {
                int no = sc.nextInt();
                int s = cms.query(no);
                System.out.println("the score for "+no+" is : "+s);
            }
        }
        cms.statistic();
    }
    public static void main4(String[] args) {
        Scanner s = new Scanner(System.in);
        BookList bl = new BookList();
        int n = s.nextInt();
        for (int i=0; i<n;i++) {
            bl.addBook(new Book(s.next(),
                    s.nextInt(),
                    s.next(),
                    s.nextInt()));
        }
        bl.searchBook(new Book(s.next(),
                0,
                s.next(),s.nextInt()));
    }
    public static void main3(String[] args) {
        // 请在Begin-End间编写代码
        /********** Begin **********/
        // 第一步：接收给定的字符串
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        // 第二步：切割字符串
        String[] strings = str.split(",");
        // 第三步：创建集合
        Set<String> set = new HashSet<>();
        //Set<String> set = new HashSet<>(Arrays.asList(strings));
        // 第四步：将切割后的元素添加进集合
        for (int i = 0; i < strings.length; i++) {
            set.add(strings[i]);
        }
        // 第五步：判断集合中元素个数是否大于4
        if(set.size() > 4) {
            if(set.contains("hello")) {
                System.out.println("集合中已有该元素");
            } else {
                set.add("hello");
            }
        } else {
            System.out.println("元素个数小于4");
        }
        // 第六步：当元素个数大于4，且元素中含有hello时，输出指定提示语

        // 第七步：当元素个数大于4，且元素中不含hello时，把hello添加进集合

        // 第八步：当元素个数小于4，输出指定提示语

        // 第九步：输出集合
        System.out.println(set);
        /********** End **********/
    }
    public static void main2(String[] args) {
        // 请在Begin-End间编写代码
        /********** Begin **********/
        // 第一步：接收给定字符串
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        // 第二步：切割字符串
        String[] strings = str.split( "，");
        String[] name = new String[strings.length];
        int[] price = new int[strings.length];
        for (int i = 0; i < strings.length; i++) {
            String[] strings1 = strings[i].split("：");
            name[i] = strings1[0];
            price[i] = Integer.parseInt(strings1[1]);
        }
        // 第三步：创建 HashMap 集合,key为菜名，value为价格
        Map<String, Integer> map = new HashMap<>();
        // 第四步：添加数据到集合中
        for (int i = 0; i < strings.length; i++) {
            map.put(name[i], price[i]);
        }
        // 第五步：往集合中添加给定的一道菜
        map.put("lamb", 50);
        // 第六步：输出所有菜名
        Set<String> set = map.keySet();
        System.out.println(set);
        // 第七步：删除红烧鱼和小炒牛肉这两道菜后输出集合长度
        map.remove("红烧鱼");
        map.remove("小炒牛肉");
        System.out.println(map.size());
        // 第八步：打印集合
        System.out.println(map);
        /********** End **********/
    }
    public static void main1(String[] args) {
        // 请在Begin-End间编写代码
        /********** Begin **********/
        // 第一步：接收给定的一行字符串
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        // 第二步：切割字符串
        String[] strings = str.split(" ");
        // 第三步：创建集合
        List<String> list = new ArrayList<>();
        // 第四步：往集合中添加元素
        for (int i = 0; i < strings.length; i++) {
            list.add(strings[i]);
        }
//        List<String> list = new ArrayList<>(Arrays.asList(strings));
        // 第五步：删除第一个元素和最后一个元素
        list.remove(0);
        list.remove(list.size() - 1);
        // 第六步：往集合中添加hello和educoder
        list.add("hello");
        list.add("educoder");
        // 第七步：修改集合中第三个元素为list
        list.set(2, "list");
        // 第八步：打印集合
        System.out.println(list);
        /********** End **********/
    }
}
